<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class CreateCruiseCheckRectifyReplyTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('cruise_check_rectify_reply', function (Blueprint $table) {
            $table->id();
            $table->unsignedInteger('cruiseCheckRectifyId')->default(0)->comment('整改单id');
            $table->string('desc', 255)->default('')->comment('整改说明');
            $table->tinyInteger('rejected')->default(0)->comment('0正常 1被驳回');

            $table->unsignedInteger('createdAt')->default(0)->comment('创建时间');
            $table->unsignedInteger('createdByUid')->default(0)->comment('创建人');
            $table->unsignedInteger('updatedAt')->default(0)->comment('修改时间');
            $table->unsignedInteger('updatedByUid')->default(0)->comment('修改人');
            $table->collation = 'utf8mb4_general_ci';
            $table->comment = '稽核 - 整改单商家整改内容';

            $table->index('cruiseCheckRectifyId', 'idx_cruiseCheckRectifyId');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('cruise_check_rectify_reply');
    }
}
